package com.hyt.it.ogt.kq.service.model.vo.wechat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hyt.core.ModelSerializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @program: it-ogt-bm
 * @description: 考务管理员推送考试安排通知请求实体
 * @author: Yang HuanKun
 * @create: 2022-01-11 16:30
 **/
@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "PushExamNotifyDTO对象", description = "考务管理员推送考试安排通知请求实体")
public class PushExamNotifyDTO implements ModelSerializable {

    @ApiModelProperty(value = "报名考生id")
    private String id;

    @ApiModelProperty(value = "考试任务名称")
    private String name;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    @ApiModelProperty(value = "考试开始时间")
    private LocalDateTime startTime;
    
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    @ApiModelProperty(value = "考试结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "考试科目")
    private String subjectName;

    @ApiModelProperty(value = "考试地点")
    private String address;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PushExamNotifyDTO)) return false;
        PushExamNotifyDTO that = (PushExamNotifyDTO) o;
        return id.equals(that.id) && subjectName.equals(that.subjectName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, subjectName);
    }
}
